clear
do "...\First.do"

********************************************************************************

clear
use "$work\analysis_sample.dta"

keep if timing==-1
bys ydernr: egen mean_ses_patient=mean(help3) // SES of the post closure physician

keep ydernr mean_ses_patient min_year

save "$work\yder_year_mean_ses.dta", replace